package com.briup.day05;

/**
 * @author lining
 * @date 2024/1/12 16:55
 */
public class Test13 {
    /*

            0000 1010    -->10
        & ~(0000 0010)    << 2
           -----------------------
            0000 1000

     */
    public static int setBit(int v,int n){
        // 提示：使⽤ ~ 及 <<  | &
        // 补全代码
        return v & ~(1 << (n-1));
    }
    public static void main(String[] args) {
        int r = setBit(10,3);
        System.out.println("r: " + r);
    }
}
